#include <sys/types.h>
#include <sys/stat.h>

int  stat(const char *path, struct stat *sb);
int lstat(const char *path, struct stat *sb);
int fstat(int fd,           struct stat *sb);

struct stat {
    ino_t     st_ino;     /* inode                         */
    dev_t     st_dev;     /* device of this file           */
    mode_t    st_mode;    /* protection + file type        */
    nlink_t   st_nlink;   /* number of hard links          */
    uid_t     st_uid;     /* user ID of owner              */
    gid_t     st_gid;     /* group ID of owner             */
    dev_t     st_rdev;    /* device type (if inode device) */
    off_t     st_size;    /* total size, in bytes          */
    blksize_t st_blksize; /* blocksize for filesystem I/O  */
    blkcnt_t  st_blocks;  /* number of blocks allocated    */
    time_t    st_atime;   /* time of last access           */
    time_t    st_mtime;   /* time of last modification     */
    time_t    st_ctime;   /* time of last file status (inode data) modification */
};
